
#include <stdio.h>
#include <stdlib.h>


int intcomp(const void *x, const void *y)
{
	return *((int*)x) - *((int*)y);
}

int main()
{
  int num = 1000000, i = 0;
  int *A = (int*)malloc(sizeof(int)*num);
  for( i = 0; i < num; i++ )
	A[i] = num - i;

  qsort(A, num, sizeof(int), intcomp);
  free(A);
  return 0;
}




